from BeautifulReport import BeautifulReport
import logging
import yagmail
class Tools():
    def log(self):
        lo=logging.basicConfig(level=logging.DEBUG,format="%(filename)s - %(asctime)s - %(levelname)s - %(message)s",filename="music.log",filemode="a+")
        return lo
    def baogao(self,suite):
        l=BeautifulReport(suite).report(description="这个是一个测试报告",filename="bao.html")
        return l
    def yaml(self,file):
        yam=yagmail.SMTP(user="3421804764@qq.com",password="ubnavehqwgiddcbe",host="smtp.qq.com")
        yam.send(to="3421804764@qq.com",subject="报告",contents=["这是一个百度的报告"],attachments=file)
        yam.close()
